﻿using UnityEngine;

namespace MassiveBattle.Controller.Boss
{
	public class BossController_10003 : BaseBossController
	{
		#region Attack Phase1
		private void Execute_Attack_Phase1()
		{
			float range = stat.atkRadius.Get(Manager.Monitor);

			if (!SetTarget(GetCandidate().GetWhere(data => data.Line == ELine.FIRST).GetTake(1, Query.ECount.TAUNT)))
				return;

			if (!SetTarget(GetCandidate().GetWhere(data => Vector3.Distance(Target.ModelTransform.position, data.ModelTransform.position) <= range).GetOrderBy(data => data == Target)))
				return;

			SetDamagePoint(SetDamagePoint_Attack_A);

			PlayTake_Attack_Source_Target();
		}
		#endregion

		#region Attack Phase2
		private void Execute_Attack_Phase2()
		{
			if (!SetTarget(GetCandidate().GetWhere(data => data.Line == ELine.FIRST).GetTake(1, Query.ECount.TAUNT)))
				return;

			SetDamagePoint(SetDamagePoint_Attack_A);

			PlayTake_Attack_Source_Target();
		}
		#endregion

		#region Skill Phase1
		private void Execute_Skill_Phase1()
		{
			if (!SetTarget(GetCandidate().GetWhere(data => data.Line == ELine.FIRST).GetTake(4, Query.ECount.TAUNT)))
				return;

			SetDamagePoint(SetDamagePoint_Skill_A);

			PlayTake_Skill_Source_Target_Camera();

			AttachCamera_Skill_B();
		}
		#endregion
	}
}
